﻿using System.Collections.Generic;
using com.guojin.core.io;
using com.guojin.core.io.message;


namespace com.guojin.mj.net.message.game
{
    public class TakeInScoreToHostReq: Message
    {
        public static int TYPE = 12 ;
        public static int ID = 36;

        public bool ReqResult { get; set; }
        public int LocationIndex { get; set; }

        public void decode(Input _in)
        {

        }

        public void encode(Output _out)
        {
            _out.writeBoolean(ReqResult);
            _out.writeInt(LocationIndex);
        }

        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }

        public string toString()
        {
            return string.Format("ReqResult= {0}, LocationIndex={1}", ReqResult, LocationIndex);
        }

        public static TakeInScoreToHostReq create(bool reqResult, int locationIndex)
        {
            var temp = new TakeInScoreToHostReq();
            temp.ReqResult = reqResult;
            temp.LocationIndex = locationIndex;
            return temp;
        }
    }
}